package com.bt.lms.ui.page.sys.style.action.btn;

import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;

/**
 * 保存按钮的鼠标移入事件
 */
public class SaveBtnMouseAction implements EventHandler<MouseEvent> {

    /**
     * 按钮
     */
    private final Button saveBtn;

    /**
     * 构建事件
     * @param saveBtn 保存按钮
     */
    public SaveBtnMouseAction(Button saveBtn) {
        this.saveBtn = saveBtn;
    }

    /**
     * 事件实现
     * @param event the event which occurred
     */
    @Override
    public void handle(MouseEvent event) {

//        //渐变背景色
//        Color color = Color.rgb(254,52,52);
//        Color toColor = Color.rgb(229,34,34);
//        BtnStyle.gradualChangeBack(saveBtn,color,toColor);
//
//        //边框
//        Color rgb = Color.rgb(215, 0, 0);
//        BtnStyle.btnBorder(saveBtn,rgb);

    }
}
